home *** CD-ROM | disk | FTP | other *** search
/ The Utilities Experience / The Utilities Experience - Volume 1.iso / software / misc / a-d / 3.0iupdate / macros.lha / TechReport.rexx < prev   
OS/2 REXX Batch file  |  1996-02-27  |  11KB  |  371 lines

  1. /* $VER: TechReport.rexx 1.0h (27.02.96)
  2.    Copyright 1996 Soft-Logik Publishing Corporation
  3.    May not be distributed without Soft-Logik Publishing Corporation's express written permission */
  4.  
  5. /* SAME OLD STUFF */
  6. OPTIONS RESULTS
  7. TRACE OFF
  8. ADDRESS COMMAND
  9. /* Make sure rexx support is opened */
  10. IF ~SHOW('L','rexxsupport.library') THEN
  11.    CALL ADDLIB('rexxsupport.library',0,-30)
  12.  
  13. /* DEFINITIONS AND REPORT SETUP */
  14. ofilename='ram:Report.TEXT'
  15. tfilename='t:Report.TEMP'
  16.  
  17. if ~open(.ofile, ofilename, 'W') then return 9
  18. call writeln(.ofile, 'PAGESTREAM 3.0 TECHNICAL SUPPORT REPORT')
  19. call writeln(.ofile, '---------------------------------------')
  20.  
  21. ADDRESS PAGESTREAM
  22. openbusyrequester message "'Preparing report...'" thermometer enabled abort enabled total 100 current 0
  23. bh=result
  24. ADDRESS COMMAND
  25.  
  26.  
  27. /* MAIN LOOP */
  28. call REGINFO()
  29.     call SETBUSY (2)
  30. call SYSTEMINFO()
  31.     call SETBUSY (5)
  32. call HELPSYSTEM()
  33.     call SETBUSY (8)
  34. call ASSIGNS()
  35.     call SETBUSY (10)
  36. call PROGRAMS()
  37.     call SETBUSY (30)
  38. call LIBS()
  39.     call SETBUSY (35)
  40. call FILTERS()
  41.     call SETBUSY (65)
  42. call EFFECTS()
  43.     call SETBUSY (70)
  44. call PRINTERS()
  45.     call SETBUSY (80)
  46. call ENGINES()
  47.     call SETBUSY (95)
  48. call SPECIAL()
  49. call COLORS()
  50.     call SETBUSY (100)
  51. call CLEANUP(0)
  52.  
  53. REGINFO:
  54. call writeln(.ofile, '')
  55. call writeln(.ofile, 'USER INFORMATION:')
  56. if ~open(.tfile, 'PageStream3:PageStream3.prefs', 'R') then rcode=9
  57.     else rcode=0
  58. user.name='Unknown'
  59. user.comp='Unknown'
  60. user.regn='Unknown'
  61. if rcode=0 then do
  62.     do until eof(.tfile)
  63.         temp=(readln(.tfile))
  64.         if left(temp,8)='USERNAME' then user.name=subword(temp,2)
  65.         if left(temp,8)='USERCOMP' then user.comp=subword(temp,2)
  66.         if left(temp,8)='USERREGN' then user.regn=subword(temp,2)
  67.     end
  68.     call close(.tfile)
  69. end
  70. call writeln(.ofile, '  User Name................. '||user.name)
  71. call writeln(.ofile, '  Company................... '||user.comp)
  72. call writeln(.ofile, '  Registration Number....... '||user.regn)
  73. return rcode
  74.  
  75. SYSTEMINFO:
  76. call writeln(.ofile, '')
  77. call writeln(.ofile, 'SYSTEM INFORMATION:')
  78. 'version >'||tfilename
  79. temp=GETTEMP()
  80. call writeln(.ofile, '  '||temp)
  81. 'cpu >'||tfilename
  82. temp=GETTEMP()
  83. call writeln(.ofile, '  '||temp)
  84. call writeln(.ofile, '')
  85. 'avail >'||tfilename
  86. if ~open(.tfile, tfilename, 'R') then return 9
  87. do 4
  88.     temp=readln(.tfile)
  89.     call writeln(.ofile, '  '||temp)
  90. end
  91. call close(.tfile)
  92. return
  93.  
  94. HELPSYSTEM:
  95. call writeln(.ofile, '')
  96. call writeln(.ofile, 'HELP SYSTEM:')
  97. if exists('libs:amigaguide.library') then do
  98.     'version libs:amigaguide.library >'||tfilename
  99.     temp=GETTEMP()
  100.     parse var temp dum ver .
  101.     call writeln(.ofile, '  AmigaGuide.library........ v'||ver)
  102. end
  103. else call writeln(.ofile, '  AmigaGuide.library........ MISSING!')
  104. if exists('sys:Utilities/AmigaGuide') then do
  105.     'version sys:utilities/amigaguide >'||tfilename
  106.     temp=GETTEMP()
  107.     parse var temp dum ver .
  108.     call writeln(.ofile, '  AmigaGuide program........ v'||ver)
  109.     agflag=1
  110. end
  111. else agflag=0
  112. if exists('sys:Utilities/Multiview') then do
  113.     'version sys:utilities/multiview >'||tfilename
  114.     temp=GETTEMP()
  115.     parse var temp dum ver .
  116.     call writeln(.ofile, '  MultiView program......... v'||ver)
  117.     mvflag=1
  118. end
  119. else mvflag=0
  120. if agflag=0 & mvflag=0 then call writeln(.ofile, '  AmigaGuide/Multiview...... MISSING!')
  121. return
  122.  
  123. ASSIGNS:
  124. call writeln(.ofile, '')
  125. call writeln(.ofile, 'ASSIGNS: (AmigaDOS assigns)')
  126.  
  127. /* find out if the softlogik: assign was made */
  128. slassign=showlist('a','SOFTLOGIK')
  129. if slassign=1 then do
  130.     'assign SoftLogik: exists >'||tfilename
  131.     if ~open(.tfile, tfilename, 'R') then return 9
  132.     temp=(readln(.tfile))
  133.     if pos('SOFTLOGIK',upper(temp))~=0 then do
  134.         parse var temp dum line
  135.         line=strip(line,'b')
  136.         call writeln(.ofile, '  SoftLogik................. '||line)
  137.     end
  138.     call close(.tfile)
  139. end
  140. else call writeln(.ofile, '  SoftLogik................. SoftLogik: ASSIGN NOT MADE!')
  141.  
  142. /* find out if the pagestream3: assign was made */
  143. pgsassign=showlist('a','PAGESTREAM3')
  144. if pgsassign=1 then do
  145.     'assign PageStream3: exists >'||tfilename
  146.     if ~open(.tfile, tfilename, 'R') then return 9
  147.     temp=(readln(.tfile))
  148.     if pos('PAGESTREAM3',upper(temp))~=0 then do
  149.         parse var temp dum line
  150.         line=strip(line,'b')
  151.         call writeln(.ofile, '  PageStream3............... '||line)
  152.     end
  153.     call close(.tfile)
  154. end
  155. else call writeln(.ofile, '  PageStream3............... PageStream3: ASSIGN NOT MADE!')
  156.  
  157. /* find out if the fonts assign addition was made */
  158. 'assign fonts: exists >'||tfilename
  159. if ~open(.tfile, tfilename, 'R') then return 9
  160. line=nul
  161. do until eof(.tfile)
  162.     temp=(readln(.tfile))
  163.     if pos('SOFTLOGIK',upper(temp))~=0 & pos('FONTS',upper(temp))~=0 then line=right(temp,length(temp)-pos('+',temp)-1)
  164. end
  165. if line=nul then call writeln(.ofile, '  Fonts..................... SoftLogik:Fonts add ASSIGN NOT MADE!')
  166. call close(.tfile)
  167. call writeln(.ofile, '  Fonts..................... '||line||' add')
  168. return
  169.  
  170. PROGRAMS:
  171. call writeln(.ofile, '')
  172. call writeln(.ofile, 'PROGRAM FILES:')
  173. if exists('PageStream3:PageStream3') then do
  174.     'version PageStream3:PageStream3 full >'||tfilename
  175.     temp=GETTEMP()
  176.     parse var temp dum ver ver2 ver3 .
  177.     if ver3='' then ver2=ver3
  178.     /* for technical reasons, PageStream has version numbers of PageStream3 1.0 instead of PageStream 3.0. Let's make it easier on the user by changing this for the report. */
  179.     ver='3'||right(ver,length(ver)-1)
  180.     if ver2='' then ver2=' '
  181.     call writeln(.ofile, '  PageStream3 program....... v'||ver||' 'ver2)
  182. end
  183. else call writeln(.ofile, '  PageStream3 program....... MISSING!')
  184. if exists('PageStream3:BME') then do
  185.     'version PageStream3:BME >'||tfilename
  186.     temp=GETTEMP()
  187.     parse var temp dum ver ver2 .
  188.     if ver2='' then ver2=' '
  189.     call writeln(.ofile, '  BME program............... v'||ver||' 'ver2)
  190. end
  191. else call writeln(.ofile, '  BME program............... MISSING!')
  192. if exists('PageStream3:PageLiner') then do
  193.     'version PageStream3:PageLiner >'||tfilename
  194.     temp=GETTEMP()
  195.     parse var temp dum ver ver2 .
  196.     if ver2='' then ver2=' '
  197.     call writeln(.ofile, '  PageLiner program......... v'||ver||' 'ver2)
  198. end
  199. else call writeln(.ofile, '  PageLiner program......... MISSING!')
  200. return
  201.  
  202. LIBS:
  203. call writeln(.ofile, '')
  204. call writeln(.ofile, 'SOFTLOGIK:LIBS (program libraries)')
  205. if exists('SoftLogik:Libs/softlogik_app.library') then 'version SoftLogik:Libs/softlogik_app.library >'||tfilename
  206. temp=GETTEMP()
  207. parse var temp dum ver .
  208. call writeln(.ofile, '  softlogik_app.library..... v'||ver)
  209. if exists('SoftLogik:Libs/softlogik_obj.library') then 'version SoftLogik:Libs/softlogik_obj.library >'||tfilename
  210. temp=GETTEMP()
  211. parse var temp dum ver .
  212. call writeln(.ofile, '  softlogik_obj.library..... v'||ver)
  213. if exists('SoftLogik:Libs/softlogik_rsrc.library') then 'version SoftLogik:Libs/softlogik_rsrc.library >'||tfilename
  214. temp=GETTEMP()
  215. parse var temp dum ver .
  216. call writeln(.ofile, '  softlogik_rsrc.library.... v'||ver)
  217. if exists('SoftLogik:Libs/softlogik_os.library') then 'version SoftLogik:Libs/softlogik_os.library >'||tfilename
  218. temp=GETTEMP()
  219. parse var temp dum ver .
  220. call writeln(.ofile, '  softlogik_os.library...... v'||ver)
  221. if exists('SoftLogik:Libs/slarexxsupport.library') then 'version SoftLogik:Libs/slarexxsupport.library >'||tfilename
  222. temp=GETTEMP()
  223. parse var temp dum ver .
  224. call writeln(.ofile, '  slarexxsupport.library.... v'||ver)
  225. return
  226.  
  227. FILTERS:
  228. call writeln(.ofile, '')
  229. call writeln(.ofile, 'SOFTLOGIK:FILTERS (filter modules)')
  230. if exists('SoftLogik:filters') then do
  231.     call GETFILES('softlogik:filters')
  232.     call SAYVERS('softlogik:filters')
  233.     end
  234. else do
  235.     call writeln(.ofile, '- Filters directory MISSING!')
  236. end
  237. return
  238.  
  239. EFFECTS:
  240. call writeln(.ofile, '')
  241. call writeln(.ofile, 'SOFTLOGIK:EFFECTS (effect modules)')
  242. if exists('SoftLogik:effects') then do
  243.     call GETFILES('softlogik:effects')
  244.     call SAYVERS('softlogik:effects')
  245.     end
  246. else do
  247.     call writeln(.ofile, '- Effects directory MISSING!')
  248. end
  249. return
  250.  
  251. PRINTERS:
  252. call writeln(.ofile, '')
  253. call writeln(.ofile, 'SOFTLOGIK:PRINTERS (printer drivers)')
  254. if exists('SoftLogik:printers') then do
  255.     call GETFILES('softlogik:printers')
  256.     call SAYVERS('softlogik:printers')
  257.     end
  258. else do
  259.     call writeln(.ofile, '- Printers directory MISSING!')
  260. end
  261. return
  262.  
  263. SPECIAL:
  264. call writeln(.ofile, '')
  265. call writeln(.ofile, 'SOFTLOGIK:SPECIAL (miscellaneous modules)')
  266. if exists('SoftLogik:special') then do
  267.     call GETFILES('softlogik:special')
  268.     call SAYVERS('softlogik:special')
  269.     end
  270. else do
  271.     call writeln(.ofile, '- Special directory MISSING!')
  272. end
  273. return
  274.  
  275. ENGINES:
  276. call writeln(.ofile, '')
  277. call writeln(.ofile, 'SOFTLOGIK:ENGINES (font and text code modules)')
  278. if exists('SoftLogik:engines') then do
  279.     call GETFILES('softlogik:engines')
  280.     call SAYVERS('softlogik:engines')
  281.     end
  282. else do
  283.     call writeln(.ofile, '- Engines directory MISSING!')
  284. end
  285. return
  286.  
  287. COLORS:
  288. call writeln(.ofile, '')
  289. call writeln(.ofile, 'SOFTLOGIK:COLORS (color libraries)')
  290. if exists('SoftLogik:colors') then do
  291.     call GETFILES('softlogik:colors')
  292.     call SAYVERS('softlogik:colors')
  293.     end
  294. else do
  295.     call writeln(.ofile, '- Colors directory MISSING!')
  296. end
  297. return
  298.  
  299.  
  300. GETTEMP:
  301.     if ~open(.tfile, tfilename, 'R') then return 9
  302.     temp=readln(.tfile)
  303.     call close(.tfile)
  304. return temp
  305.  
  306. GETFILES:
  307.     parse arg path
  308.     Files=showdir(path,file,'|')
  309.     fLength=length(Files)
  310.     nList=0
  311.     DO WHILE fLength>0
  312.         cLength=pos('|',Files)
  313.         IF cLength=0 then DO
  314.             cLength=FLength+1
  315.             fLength=0
  316.         END
  317.         cFile=left(Files,cLength-1)
  318.         eFile=right(cFile,cLength-lastpos('.',cFile))
  319.         IF eFile~='.info' THEN DO
  320.             nList=nList+1
  321.             List.nList=cFile
  322.         END
  323.         IF FLength~=0 THEN Files=right(Files,fLength-cLength)
  324.         fLength=fLength-cLength
  325.     END
  326. return
  327.  
  328. SAYVERS:
  329.     parse arg path
  330.     do count=1 to nlist
  331.         if right(list.count,5)~='.info' then do
  332.             if upper(right(list.count,8))='FONTLIST' | upper(list.count)='POSTSCRIPT.EHANDLER' | upper(right(list.count,6))='HEADER' | upper(right(list.count,10))='DICTIONARY' | upper(left(list.count,7))='PANTONE' | upper(left(list.count,7))='CRAYONS' | upper(right(list.count,12))='.HYPHENATION' then do
  333.                 'list "'||path||'/'list.count||'" lformat %l >'||tfilename
  334.                 ver=' '||GETTEMP()||' bytes'
  335.             end
  336.             else do
  337.                 'version '||path||'/'||list.count||' >'||tfilename
  338.                 temp=GETTEMP()
  339.                 parse var temp dum ver ver2 .
  340.                 if ver2='' then ver2=' '
  341.                 ver=' v'||ver||' '||ver2
  342.             end
  343.             call writeln(.ofile,substr('  '||list.count,1,28,'.')||ver)
  344.         end
  345.     end
  346. return
  347.  
  348.  
  349. SETBUSY:
  350.     parse arg value
  351.     ADDRESS PAGESTREAM
  352.     setbusyrequester bh current value
  353.     getbusyrequester bh
  354.     if result=1 then call CLEANUP(1)
  355.     ADDRESS COMMAND
  356. return
  357.  
  358.  
  359. CLEANUP:
  360.     parse arg value
  361.     call close(.ofile)
  362.     ADDRESS PAGESTREAM
  363.     closebusyrequester bh
  364.     ADDRESS COMMAND
  365.     if value=0 then do
  366.         'sys:utilities/multiview '||ofilename
  367.         if rc>0 then 'sys:utilities/amigaguide '||ofilename
  368.     end
  369.     'delete '||tfilename||' >NIL:'
  370. exit
  371.